<?php

/**
 * This is a utility class for accessing common HTTP request params
 * using php's request variables
 * 
 * $_GET
 * $_POST
 *
 * These methods contain the preventions from xss attacks
 */
class HTTPRequest{
	
	
	public static function getParam($name){
		
		if (isset($_GET[$name])){
			return htmlspecialchars($_GET[$name]);
			
		}else if (isset($_POST[$name])){
			return htmlspecialchars($_POST[$name]);			
		}
		
		return null;
	}
}

?>
